﻿using System;

namespace AnimalApplication
{
    public abstract class Animal
    {
        private string name;

        public Animal(string name)
        {
            this.name = name;
        }

        public string getName()
        {
            return name;
        }

        private void setName(string name)
        {
            this.name = name;
        }

        public abstract void enjoy();
    }

    public class Cat : Animal
    {
        private string eyesColor;

        public Cat(string name, string eyesColor) : base(name)
        {
            this.eyesColor = eyesColor;
        }

        public string getEyesColor()
        {
            return eyesColor;
        }

        private void setEyesColor(string eyesColor)
        {
            this.eyesColor = eyesColor;
        }

        public override void enjoy()
        {
            Console.WriteLine($"猫咪{getName()}开心地眯起了{eyesColor}的眼睛，发出咕噜声~");
        }
    }

    public class Dog : Animal
    {
        private string furColor;

        public Dog(string name, string furColor) : base(name)
        {
            this.furColor = furColor;
        }

        public string getFurColor()
        {
            return furColor;
        }

        private void setFurColor(string furColor)
        {
            this.furColor = furColor;
        }

        public override void enjoy()
        {
            Console.WriteLine($"狗狗{getName()}摇着{furColor}的尾巴，汪汪地叫了起来！");
        }
    }

    public class Lady
    {
        private string name;
        private Animal pet;

        public Lady(string name, Animal pet)
        {
            this.name = name;
            this.pet = pet;
        }

        public string getName()
        {
            return name;
        }

        private void setName(string name)
        {
            this.name = name;
        }

        public Animal getPet()
        {
            return pet;
        }

        private void setPet(Animal pet)
        {
            this.pet = pet;
        }

        public void myPetEnjoy()
        {
            Console.Write($"{name}的宠物");
            pet.enjoy();
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            Cat cat = new Cat("雪球", "蓝色");
            Lady ladyZhang = new Lady("张女士", cat);
            ladyZhang.myPetEnjoy();

            Dog dog = new Dog("大黄", "金色");
            Lady ladyWang = new Lady("王女士", dog);
            ladyWang.myPetEnjoy();
        }
    }
}